﻿@page "/tables/lookup"

<h3>@LookupLocalizer["Title"]</h3>

<h4>@((MarkupString)LookupLocalizer["Desc"].Value)</h4>

<DemoBlock Title="@LookupLocalizer["LookupTitle"]" Introduction="@LookupLocalizer["LookupIntro"]" Name="Lookup">
    <p>@((MarkupString)LookupLocalizer["LookupP1"].Value)</p>
    <Pre>DataSource = new List&lt;SelectedItem&gt;
{
    new SelectedItem { Value = "true", Text = @Localizer["True"].Value },
    new SelectedItem { Value = "false", Text = @Localizer["False"].Value }
};</Pre>
    <p>@((MarkupString)LookupLocalizer["LookupP2"].Value)</p>
    <p>@((MarkupString)LookupLocalizer["LookupP3"].Value)</p>
    @if (Items != null)
    {
        <Table TItem="Foo" Items="@Items.Take(3)">
            <TableColumns>
                <TableColumn @bind-Field="@context.DateTime" Width="180" />
                <TableColumn @bind-Field="@context.Name" />
                <TableColumn @bind-Field="@context.Complete" LookupServiceKey="Foo.Complete" />
            </TableColumns>
        </Table>
    }
</DemoBlock>
